
def mark(flag):
    def out_func(fn):
        def inner_func(num1, num2):
            if flag == '+':
                print(f"你输入的实参是{flag},正努力加法运算中...")
                result = fn(num1,num2)
            elif flag == '-':
                print(f"你输入的实参是{flag},正努力加法运算中...")
                result = fn(num1, num2)
            else:
                result = "输入错误"
            return result;

        return inner_func

    return out_func

@mark("+")
def add(num1,num2):
    print(num1+num2)

@mark("-")
def sub(num1,num2):
    print(num1-num2)


add(1,1)
sub(2,1)